//
//  YLCDynamicPhotoCell.m
//  LinYa
//
//  Created by 初程程 on 2018/1/25.
//  Copyright © 2018年 初程程. All rights reserved.
//

#import "YLCDynamicPhotoCell.h"

@implementation YLCDynamicPhotoCell
{
    UIImageView *photoView;
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        photoView = [[UIImageView alloc] initWithFrame:self.bounds];
        
        photoView.contentMode = UIViewContentModeScaleToFill;
        
        photoView.clipsToBounds = YES;
        
        [self.contentView addSubview:photoView];
    }
    return self;
}
- (void)setImagePath:(NSString *)imagePath{
    [photoView sd_setImageWithURL:[NSURL URLWithString:imagePath]];
    [self setNeedsDisplay];
    [self setNeedsLayout];
}
- (UIImageView *)getImageView{
    return photoView;
}
- (void)layoutSubviews{
    [super layoutSubviews];

}
@end
